package edu.dzxx.service.impl;

import edu.dzxx.pojo.Table;
import edu.dzxx.service.GeologicalService;
import edu.dzxx.dao.GeologicalMapper;
import edu.dzxx.pojo.Geological;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Service("geologicalService")
public class GeologicalServiceImpl implements GeologicalService {

    @Autowired
    private GeologicalMapper geologicalMapper;
    @Override
    public List<Geological> getGeologicalList(String ID,String tableName,int isDel) {
        List<Geological> list=geologicalMapper.getGeologicalList(ID,tableName,isDel);
        int i=1;
        for (Geological geological:list){
            System.out.println(i+"："+geological.getDescription());
            i++;
        }
        return list;
    }

    @Override
    public Integer delDzxx(String ID, String tableName, int isDel) {
        return geologicalMapper.delDzxx(ID,tableName,isDel);
    }

    @Override
    public Integer updateDzxx(String tableName,String Label,String Type,String Father,String Reference_ID,String Description,String Location,String Period,String ID) {
        return geologicalMapper.updateDzxx(tableName,Label,Type,Father,Reference_ID,Description,Location,Period,ID);
    }

    @Override
    public List<Table> getTables() {
        return geologicalMapper.getTables();
    }
}
